package com.udaos.models.card;

import java.io.Serializable;

import org.nutz.dao.entity.annotation.ColDefine;
import org.nutz.dao.entity.annotation.ColType;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.EL;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.One;
import org.nutz.dao.entity.annotation.Prev;
import org.nutz.dao.entity.annotation.Table;

import com.udaos.models.sys.Sys_unit;


/**
 * 微信卡券
 * @author mutaotao
 *
 */
@Table("ud_wx_card")
public class Ud_wx_card implements Serializable{

	private static final long serialVersionUID = 2967925954737221403L;

	@Column
	@Name
	@Prev(els = {@EL("uuid()")})
	private String id; 
	
	@Column
	@Comment("所属主体")
	private String company_id;
	
	@Column
	@Comment("所属单位")
	@ColDefine(type = ColType.VARCHAR, width = 32)
	private String unitid;
	
	@One(target = Sys_unit.class, field = "unitid")
	private Sys_unit unit;
	
	@Column
	private String wxid;
	
	@Column
	@Comment("卡券类型")
	private String card_type;
	
	@Column
	@Comment("卡券的商户logo，建议像素为300*300")
	private String logo_url;
	
	@Column
	@Comment("Code展示类型")
	private String code_type;
	
	@Column
	@Comment("商户名字,字数上限为12个汉字")
	private String brand_name;
	
	@Column
	@Comment("卡券名，字数上限为9个汉字")
	private String title;
	
	@Column
	@Comment("券名，字数上限为18个汉字")
	private String sub_title;
	
	@Column
	@Comment("券颜色")
	private String color;
	
	@Column
	@Comment("卡券使用提醒，字数上限为16个汉字")
	private String notice;
	
	@Column
	@Comment("卡券使用说明，字数上限为1024个汉字")
	private String description;
	
	@Column
	@Comment("卡券库存的数量，上限为100000000")
	private Integer quantity;
	
	@Column
	@Comment("使用时间的类型:DATE_TYPE_FIX_TIME_RANGE 表示固定日期区间，DATE_TYPE_FIX_TERM表示固定时长（自领取后按天算")
	private String type;
	
	@Column
	@Comment("type为DATE_TYPE_FIX_TIME_RANGE时专用，表示起用时间")
	private Integer begin_timestamp;
	
	@Column
	@Comment("type为DATE_TYPE_FIX_TIME_RANGE时，表示卡券统一的结束时间")
	private Integer end_timestamp;
	
	@Column
	@Comment("type为DATE_TYPE_FIX_TERM时专用，表示自领取后多少天内有效，不支持填写0")
	private Integer fixed_term;
	
	@Column
	@Comment("type为DATE_TYPE_FIX_TERM时专用，表示自领取后多少天开始生效，领取后当天生效填写0")
	private Integer fixed_begin_term;
	
	@Column
	@Comment("是否自定义Code码。填写true或false，默认为false")
	private boolean use_custom_code;
	
	@Column
	@Comment("是否指定用户领取，填写true或false。默认为false")
	private boolean bind_openid;
	
	@Column
	@Comment("客服电话")
	private String service_phone;
	
	@Column
	@Comment("第三方来源名")
	private String source;
	
	@Column
	@Comment("自定义跳转外链的入口名字")
	private String custom_url_name;
	
	@Column
	@Comment("显示在入口右侧的提示语")
	private String custom_url_sub_title;
	
	@Column
	@Comment("自定义跳转的URL")
	private String custom_url;
	
	@Column
	@Comment("卡券顶部居中的按钮，仅在卡券状态正常(可以核销)时显示")
	private String center_title;
	
	@Column
	@Comment("显示在入口下方的提示语，仅在卡券状态正常(可以核销)时显示")
	private String center_sub_title;
	
	@Column
	@Comment("顶部居中的url，仅在卡券状态正常(可以核销)时显示")
	private String center_url;
	
	@Column
	@Comment("营销场景的自定义入口名称")
	private String promotion_url_name;
	
	@Column
	@Comment("入口跳转外链的地址链接")
	private String promotion_url;
	
	@Column
	@Comment("显示在营销入口右侧的提示语")
	private String promotion_url_sub_title;
	
	@Column
	@Comment("每人可领券的数量限制,不填写默认为50")
	private Integer get_limit;
	
	@Column
	@Comment("卡券领取页面是否可分享")
	private boolean can_share;
	
	@Column
	@Comment("卡券是否可转赠")
	private boolean can_give_friend;
	
	@Column
	@Comment("指定可用的商品类目，仅用于代金券类型，填入后将在券面拼写指定xx可用")
	private String accept_category;
	
	@Column
	@Comment("指定可用的商品类目，仅用于代金券类型，填入后将在券面拼写指定xx不可用")
	private String reject_category;
	
	@Column
	@Comment("满减门槛字段，可用于兑换券和代金券，填入后将在全面拼写消费满xx元可用")
	private String least_cost;
	
	@Column
	@Comment("购买xx可用类型门槛，仅用于兑换，填入后自动拼写购买xxx可用")
	private String object_use_for;
	
	@Column
	@Comment("不可以与其他类型共享门槛，填写false时系统将在使用须知里拼写不可与其他优惠共享，默认为true")
	private boolean can_use_with_other_discount;
	
	@Column
	@Comment("封面摘要简介")
	private String abstractStr;
	
	@Column
	@Comment("封面图片列表，仅支持填入一个封面图片链接")
	private String icon_url_list;
	
	@Column
	@Comment("图片链接")
	private String image_url;
	
	@Column
	@Comment("图片链接")
	private String image_url1;
	
	@Column
	@Comment("图片链接")
	private String image_url2;
	
	@Column
	@Comment("图文描述，5000字以内")
	private String text;
	
	@Column
	@Comment("图文描述，5000字以内")
	private String text1;
	
	@Column
	@Comment("图文描述，5000字以内")
	private String text2;
	
	@Column
	@Comment("状态 0:已发布")
	private String state;
	
	@Column
	@Comment("微信返回的card_id")
	private String card_id;
	
	@Column
	@Comment("卡券编码")
	private String code;
	
	@Column
	@Comment("额度")
	private double card_fee;
	
	@Column
	@Comment("创建时间")
	private Integer create_time;
	
	@Column
	@Comment("创建时间")
	private String remark;

	public Ud_wx_card() {
		super();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUnitid() {
		return unitid;
	}

	public void setUnitid(String unitid) {
		this.unitid = unitid;
	}

	public Sys_unit getUnit() {
		return unit;
	}

	public void setUnit(Sys_unit unit) {
		this.unit = unit;
	}

	public String getCard_type() {
		return card_type;
	}

	public void setCard_type(String card_type) {
		this.card_type = card_type;
	}

	public String getLogo_url() {
		return logo_url;
	}

	public void setLogo_url(String logo_url) {
		this.logo_url = logo_url;
	}

	public String getCode_type() {
		return code_type;
	}

	public void setCode_type(String code_type) {
		this.code_type = code_type;
	}

	public String getBrand_name() {
		return brand_name;
	}

	public void setBrand_name(String brand_name) {
		this.brand_name = brand_name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSub_title() {
		return sub_title;
	}

	public void setSub_title(String sub_title) {
		this.sub_title = sub_title;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getNotice() {
		return notice;
	}

	public void setNotice(String notice) {
		this.notice = notice;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getBegin_timestamp() {
		return begin_timestamp;
	}

	public void setBegin_timestamp(Integer begin_timestamp) {
		this.begin_timestamp = begin_timestamp;
	}

	public Integer getEnd_timestamp() {
		return end_timestamp;
	}

	public void setEnd_timestamp(Integer end_timestamp) {
		this.end_timestamp = end_timestamp;
	}

	public Integer getFixed_term() {
		return fixed_term;
	}

	public void setFixed_term(Integer fixed_term) {
		this.fixed_term = fixed_term;
	}

	public Integer getFixed_begin_term() {
		return fixed_begin_term;
	}

	public void setFixed_begin_term(Integer fixed_begin_term) {
		this.fixed_begin_term = fixed_begin_term;
	}

	public boolean isUse_custom_code() {
		return use_custom_code;
	}

	public void setUse_custom_code(boolean use_custom_code) {
		this.use_custom_code = use_custom_code;
	}

	public boolean isBind_openid() {
		return bind_openid;
	}

	public void setBind_openid(boolean bind_openid) {
		this.bind_openid = bind_openid;
	}

	public String getService_phone() {
		return service_phone;
	}

	public void setService_phone(String service_phone) {
		this.service_phone = service_phone;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getCustom_url_name() {
		return custom_url_name;
	}

	public void setCustom_url_name(String custom_url_name) {
		this.custom_url_name = custom_url_name;
	}

	public String getCustom_url_sub_title() {
		return custom_url_sub_title;
	}

	public void setCustom_url_sub_title(String custom_url_sub_title) {
		this.custom_url_sub_title = custom_url_sub_title;
	}

	public String getCustom_url() {
		return custom_url;
	}

	public void setCustom_url(String custom_url) {
		this.custom_url = custom_url;
	}

	public String getCenter_title() {
		return center_title;
	}

	public void setCenter_title(String center_title) {
		this.center_title = center_title;
	}

	public String getCenter_sub_title() {
		return center_sub_title;
	}

	public void setCenter_sub_title(String center_sub_title) {
		this.center_sub_title = center_sub_title;
	}

	public String getCenter_url() {
		return center_url;
	}

	public void setCenter_url(String center_url) {
		this.center_url = center_url;
	}

	public String getPromotion_url_name() {
		return promotion_url_name;
	}

	public void setPromotion_url_name(String promotion_url_name) {
		this.promotion_url_name = promotion_url_name;
	}

	public String getPromotion_url() {
		return promotion_url;
	}

	public void setPromotion_url(String promotion_url) {
		this.promotion_url = promotion_url;
	}

	public String getPromotion_url_sub_title() {
		return promotion_url_sub_title;
	}

	public void setPromotion_url_sub_title(String promotion_url_sub_title) {
		this.promotion_url_sub_title = promotion_url_sub_title;
	}

	public Integer getGet_limit() {
		return get_limit;
	}

	public void setGet_limit(Integer get_limit) {
		this.get_limit = get_limit;
	}

	public boolean isCan_share() {
		return can_share;
	}

	public void setCan_share(boolean can_share) {
		this.can_share = can_share;
	}

	public boolean isCan_give_friend() {
		return can_give_friend;
	}

	public void setCan_give_friend(boolean can_give_friend) {
		this.can_give_friend = can_give_friend;
	}

	public String getAccept_category() {
		return accept_category;
	}

	public void setAccept_category(String accept_category) {
		this.accept_category = accept_category;
	}

	public String getReject_category() {
		return reject_category;
	}

	public void setReject_category(String reject_category) {
		this.reject_category = reject_category;
	}

	public String getLeast_cost() {
		return least_cost;
	}

	public void setLeast_cost(String least_cost) {
		this.least_cost = least_cost;
	}

	public String getObject_use_for() {
		return object_use_for;
	}

	public void setObject_use_for(String object_use_for) {
		this.object_use_for = object_use_for;
	}

	public boolean getCan_use_with_other_discount() {
		return can_use_with_other_discount;
	}

	public void setCan_use_with_other_discount(boolean can_use_with_other_discount) {
		this.can_use_with_other_discount = can_use_with_other_discount;
	}

	public String getAbstractStr() {
		return abstractStr;
	}

	public void setAbstractStr(String abstractStr) {
		this.abstractStr = abstractStr;
	}

	public String getIcon_url_list() {
		return icon_url_list;
	}

	public void setIcon_url_list(String icon_url_list) {
		this.icon_url_list = icon_url_list;
	}

	public String getImage_url() {
		return image_url;
	}

	public void setImage_url(String image_url) {
		this.image_url = image_url;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getCard_id() {
		return card_id;
	}

	public void setCard_id(String card_id) {
		this.card_id = card_id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public double getCard_fee() {
		return card_fee;
	}

	public void setCard_fee(double card_fee) {
		this.card_fee = card_fee;
	}

	public Integer getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Integer create_time) {
		this.create_time = create_time;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getWxid() {
		return wxid;
	}

	public void setWxid(String wxid) {
		this.wxid = wxid;
	}

	public String getImage_url1() {
		return image_url1;
	}

	public void setImage_url1(String image_url1) {
		this.image_url1 = image_url1;
	}

	public String getImage_url2() {
		return image_url2;
	}

	public void setImage_url2(String image_url2) {
		this.image_url2 = image_url2;
	}

	public String getText1() {
		return text1;
	}

	public void setText1(String text1) {
		this.text1 = text1;
	}

	public String getText2() {
		return text2;
	}

	public void setText2(String text2) {
		this.text2 = text2;
	}

	public String getCompany_id() {
		return company_id;
	}
	public void setCompany_id(String company_id) {
		this.company_id = company_id;
	}
	
	
}
